//
//  HJHomeButton.m
//  newOcWeibo
//
//  Created by heJing on 15/7/26.
//  Copyright © 2015年 heima. All rights reserved.
//

#import "HJHomeButton.h"

@implementation HJHomeButton

//// 按钮文字位置
//-(CGRect)titleRectForContentRect:(CGRect)contentRect
//{
//    return [super titleRectForContentRect:contentRect];
//}
//
//// 按钮图片位置
//-(CGRect)imageRectForContentRect:(CGRect)contentRect
//{
//    return [super imageRectForContentRect:contentRect];
//}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    /*
    [self.titleLabel.text sizeWithAttributes:dict];
    CGFloat titleW = self.frame.size.width * 0.8;
    CGFloat titleH = self.frame.size.height;
    self.titleLabel.frame = CGRectMake(0, 0, titleW, titleH);
    
    self.imageView.frame = CGRectMake(titleW, 0, self.frame.size.width - titleW, titleH);
     */
    
    
    // 1.设置标题的x等于图片的X
    self.titleLabel.x = 0;
    // 2.设置图片的X等于标题最大的X
    self.imageView.x = CGRectGetMaxX(self.titleLabel.frame);
}

@end
